#include<fcntl.h>
#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
int main(){
    close(1);
    int fd=open("t1.txt",O_CREAT |O_WRONLY|O_TRUNC,0666);
  //  write(fd,"aaa",3);
  //dup2(fd,1);
 // printf("%d",stdout->_fileno);
 // printf("fd:\n%d\n",fd);
//   write(fd,"write\n",6);
   printf("printf\n");
   close(fd);
  // fprintf(stdout,"fprintf\n");
 //  fwrite("fwrite\n",1,7,stdout);
 //  fork();
    return 0;
}
